<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // let a = function(b){
        //     console.log(b);
        // }
        // let b = function(){
        //     return 1+1;
        // }
        function add(num1, num2, callback) {
            var sum = num1 + num2;
            callback(sum);
        }
 
        function print(num) {
            console.log(num);
        }
 
        add(1, 2, print); //3
    </script>
</body>
</html>